import request from './request/index.js'

const apiAstWebDirC = (d) => request({ method: 'post', url: '/asset/web/directory/create', data: d }) // 创建 - 目录
const apiAstWebDirD = (d, v) => request({ method: 'delete', url: '/asset/web/directory/delete', data: d }, v) // 删除 -
const apiAstWebDirPg = (d) => request({ method: 'get', url: '/asset/web/directory/page', data: d }) // 分页 -
export const ApiAstWebDir = {
  C: apiAstWebDirC,
  D: apiAstWebDirD,
  Pg: apiAstWebDirPg,
}

const apiAstWebProDirC = (d) => request({ method: 'post', url: '/asset/web/project-directory/create', data: d }) // 创建 - 项目目录
const apiAstWebProDirD = (d, v) => request({ method: 'delete', url: '/asset/web/project-directory/delete', data: d }, v) // 删除 -
const apiAstWebProDirPg = (d) => request({ method: 'get', url: '/asset/web/project-directory/page', data: d }) // 分页 -
const apiAstWebProDirBrd = (d) => request({ method: 'post', url: '/asset/web/project-directory/brand', data: d }) // 转交 -
const apiAstWebProDirDl = (d) => request({ method: 'get', url: '/asset/web/project-directory/download', data: d }) // 下载 -
export const ApiAstWebProDir = {
  C: apiAstWebProDirC,
  D: apiAstWebProDirD,
  Pg: apiAstWebProDirPg,
  Brd: apiAstWebProDirBrd,
  Dl: apiAstWebProDirDl,
}

const apiAstWebProMbrC = (d) => request({ method: 'post', url: '/asset/web/project-member/create', data: d }) // 创建 - 项目成员
const apiAstWebProMbrD = (d, v) => request({ method: 'delete', url: '/asset/web/project-member/delete', data: d }, v) // 删除 -
const apiAstWebProMbrPg = (d) => request({ method: 'get', url: '/asset/web/project-member/page', data: d }) // 分页 -
export const ApiAstWebProMbr = {
  C: apiAstWebProMbrC,
  D: apiAstWebProMbrD,
  Pg: apiAstWebProMbrPg,
}

const apiAstWebProRecPg = (d) => request({ method: 'get', url: '/asset/web/project-record/page', data: d }) // 分页 - 项目操作记录
export const ApiAstWebProRec = {
  Pg: apiAstWebProRecPg,
}

const apiAstWebProPermR = (d) => request({ method: 'get', url: '/asset/web/project-permission/get', data: d }) // 获取 - 项目权限
const apiAstWebProPermU = (d) => request({ method: 'put', url: '/asset/web/project-permission/update', data: d }) // 更新 - 
export const ApiAstWebProPerm = {
  R: apiAstWebProPermR,
  U: apiAstWebProPermU,
}
